How to apply a custom function to a column that generates columns

join shbcf.ru